import * as React from 'react'

interface Props {
  sliders:string[]
  
}

class SwiperDots extends React.Component
<Props> 
{

  // state = { :  }
  state = {selectedIndex:0}
  changeSelectedIndex=(selectedIndex:number)=>{
    this.setState({ selectedIndex})
  }
  render() { 
    let {sliders} = this.props
    return ( 
      (
        <div className="dots">
          {
            sliders.map((item:string,index:number)=>(
              <span key={index} className={'dot'+(this.state.selectedIndex === index?' active':'')}>
              </span>
            ))
          }
        </div>
      )
      
    )
  }
}
 
export default SwiperDots